package com.wanhong.springboot.ssm.framework.common;

import java.io.Serializable;

/**
 * 分页模型
 * 
 * @author w_yu
 *
 */
public class Page implements Serializable
{
	private static final long serialVersionUID = 8009865529823393744L;

	/**
	 * 总数
	 */
	private Long total;

	/**
	 * 分页大小
	 */
	private Integer pageSize;

	/**
	 * 总页数
	 */
	private Integer totalPage;

	/**
	 * 当前页码
	 */
	private Integer pageIndex;

	/**
	 * 分页起始
	 */
	private Integer startIndex;

	/**
	 * 分页结束
	 */
	private Integer endIndex;

	public Page()
	{
		super();
	}

	public Page(long total, int pageSize, int totalPage, int pageIndex)
	{
		super();
		this.total = total;
		this.pageSize = pageSize;
		this.totalPage = totalPage;
		this.pageIndex = pageIndex;
	}

	public Long getTotal()
	{
		return total;
	}

	public void setTotal(Long total)
	{
		this.total = total;
	}

	public Integer getPageSize()
	{
		return pageSize;
	}

	public void setPageSize(Integer pageSize)
	{
		this.pageSize = pageSize;
	}

	public Integer getTotalPage()
	{
		return totalPage;
	}

	public void setTotalPage(Integer totalPage)
	{
		this.totalPage = totalPage;
	}

	public Integer getPageIndex()
	{
		return pageIndex;
	}

	public void setPageIndex(Integer pageIndex)
	{
		this.pageIndex = pageIndex;
	}

	public Integer getStartIndex()
	{
		return startIndex;
	}

	public void setStartIndex(Integer startIndex)
	{
		this.startIndex = startIndex;
	}

	public Integer getEndIndex()
	{
		return endIndex;
	}

	public void setEndIndex(Integer endIndex)
	{
		this.endIndex = endIndex;
	}

	@Override
	public String toString()
	{
		return "Page [total=" + total + ", pageSize=" + pageSize + ", totalPage=" + totalPage
				+ ", pageIndex=" + pageIndex + ", startIndex=" + startIndex + ", endIndex="
				+ endIndex + "]";
	}
}
